
  if(navigator.serviceWorker){
       /*  // For security reasons, a service worker can only control the pages that are in the same directory level or below it. That's why we put sw.js at ROOT level. */
        // navigator.serviceWorker
        //     .register('/sw.js')
        //     .then((registration) => {console.log('Service Worker Registered. ', registration)})
        //     .catch((error) => {console.log('ServiceWorker registration failed: ', error)})
    }

function async(u, c) {
    var d = document, t = 'script',
        o = d.createElement(t),
        s = d.getElementsByTagName(t)[0];
    o.src = u;
    if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
    s.parentNode.insertBefore(o, s);
  }

if($('#tag_cloud').length !== 0){
    async('/front/default/static/js/jquery.tagcloud.js',function(){
        $.fn.tagcloud.defaults = {
            //size: {start: 1, end: 1, unit: 'em'},
            color: {start: '#bbbbee', end: '#0085a1'},
        };
        $('#tag_cloud a').tagcloud();
    })
}


async("/front/default/static/js/fastclick.min.js", function () {
    var $nav = document.querySelector("nav");
    if($nav) FastClick.attach($nav);
})